import { createRouter, createWebHistory } from "vue-router";
import Layout from "@/components/layout.vue";

const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "home",
        meta: { title: "首页" },
        component: () => import("@/views/home/index.vue"),
      },
      {
        path: "/payOrder",
        name: "payOrder",
        meta: { title: "支付订单" },
        component: () => import("@/views/payOrder/index.vue"),
      }
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;